package ReenTry_Lock;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025-03-04
 * Time: 21:56
 */
public class Reentry_Lock {
    public static void main(String[] args) {
        Object locker = new Object();
        Thread thread = new Thread(()->{
            synchronized (locker){
                System.out.println("第一层锁");
                synchronized (locker){
                    System.out.println("第二层锁");
                }
            }
        });
        thread.start();
    }
}
